﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>1.0.登陆</title>
    <script type="text/javascript" src="../../Content/highlighter/scripts/shCore.js"></script>
    <script type="text/javascript" src="../../Content/highlighter/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="../../Content/highlighter/scripts/shBrushXml.js"></script>
    <link type="text/css" rel="stylesheet" href="../../Content/highlighter/styles/shCore.css" />
    <link type="text/css" rel="stylesheet" href="../../Content/highlighter/styles/shCoreEclipse.css" />
    <script type="text/javascript">SyntaxHighlighter.all();</script>
</head>
<body>
    <h3>视图的一般语法</h3>
    <b>1.调用其它模板：</b>
    <pre class="brush: csharp;">
        Render("/NFinalPlug/Views/Common/Header.cshtml",Model.Header);
        Render("/NFinalPlug/Views/Common/Footer.cshtml",Model.Footer);
    </pre>
    <b>
        2.使用Razor基本语法：
    </b>
    <pre class="brush: csharp">
        //a.变量输出
        @Model.a
        //b.代码段
        @{int a=1;}
        //if,while,for等代码块
        @if(a>0)
        {

        }
        else
        {

        }
    </pre>
    <b>3.using语句</b>
    <pre class="brush: csharp;">
        @using System.Linq
    </pre>
    <b>4.inherits语句,标识父类。</b>
    <pre class="brush: csharp;">
        @inherits NFinal.Views.RazorView&lt;NFinalCorePlug.Controllers.IndexController_Model.Index>
    </pre>
</body>
</html>